﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.Composition;

namespace ViewMaker.Core.Wpf
{
    [Export(typeof(IViewGenerateService))]
    public class WpfWindowGenerateService : WpfViewContentGenerateService, IViewGenerateService
    {

        public WpfWindowGenerateService()
        {
        }

        public IView BuildWindowView(object viewModel, ViewLayoutItem layout = null, bool editable = true)
        {
            layout = GenerateViewLayout(viewModel, layout);
            var view = new WpfWindowView(layout, viewModel);
            var ret = BuildContent(view.Window, viewModel, layout, editable);
            return view;
        }


    }

}
